package org.cuatrovientos.erp.model;



import java.sql.Date;
import java.sql.Timestamp;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;
import javax.validation.constraints.Max;


/**
 * 
 * @author CARLOS
 *
 */
public class Message {
	@NotNull(message="ID cannot be null")
	private int id;
	@NotNull(message="Name cannot be null")
	private String title;	
	@NotNull(message="Name cannot be null")
	private String message;
	private Timestamp date;
	@NotNull(message="IdState cannot be null")
	@Min(1)
	private int iduser;
	

public Message () {
	
}


public Message(int id, String title, String message, Timestamp date, int iduser) {
	super();
	this.id = id;
	this.title = title;
	this.message = message;
	this.date = date;
	this.iduser = iduser;
}


public int getId() {
	return id;
}


public void setId(int id) {
	this.id = id;
}


public String getTitle() {
	return title;
}


public void setTitle(String title) {
	this.title = title;
}


public String getMessage() {
	return message;
}


public void setMessage(String message) {
	this.message = message;
}


public Timestamp getDate() {
	return date;
}


public void setDate(Timestamp date) {
	this.date = date;
}


public int getIduser() {
	return iduser;
}


public void setIduser(int iduser) {
	this.iduser = iduser;
}


@Override
public String toString() {
	return "Message [id=" + id + ", title=" + title + ", message=" + message
			+ ", date=" + date + ", iduser=" + iduser + "]";
}



}
